<%@ page import="cqcvc.edu.cn.entity.ActivityInfo" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021-12-24
  Time: 上午 9:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>

<body>
<jsp:include page="../index/index-header.jsp"></jsp:include>

<%
    List<ActivityInfo> aiList = (List<ActivityInfo>) application.getAttribute("activityInfos");
%>
<div ng-controller="activeCtrl" class="container" ng-init="getData()">

    <img src="images/slider2.png" alt="" width="100%" style="margin-bottom: 10px"/>
    <div class="row">
        <div class="col-lg-4">
            <% for (int i = 0; i < aiList.size(); i++) {
            %>
            <ul class="list-group">
                <li class="list-group-item" ng-repeat="item in data"><a href="activity_detail.jsp?id=<%=aiList.get(i).getId()%>"><%=aiList.get(i).getActTitle()%></a></li>
            </ul>
            <%}%>
        </div>

        <div class="col-lg-8">
            <div class="media" ng-repeat="item in data">
                <% for (int i = 0; i < aiList.size(); i++) {
                %>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="media-left">
                            <a href="activity_detail.jsp?id=<%=aiList.get(i).getId()%>"><img class="media-object" width="64px" height="64px"
                                                                     src="activity_image_show?id=<%=aiList.get(i).getId()%>" alt="..."/></a>
                        </div>
                        <div class="media-body">
                            <h4 class="media-heading"><%=aiList.get(i).getActTitle()%></h4>
                            <p>活动价格:<%=aiList.get(i).getActPrice()%></p>
                        </div>
                        <div class="media-right">
                            <a href="activity_detail.jsp?id=<%=aiList.get(i).getId()%>" class="btn btn-zise">详细</a>
                        </div>
                    </div>
                    <div class="panel-collapse">
                        <div class="panel-body">
                            <p>开始时间:<%=aiList.get(i).getStartDate()%></p>
                            <p>结束时间:<%=aiList.get(i).getEndDate()%></p>
                            <p>
                                活动详情:<%=aiList.get(i).getActDetail()%></p>
                        </div>
                    </div>
                </div>
                <%}%>

            </div>
        </div>
    </div>
    <div class="row">
        <div class="btn-group col-xs-offset-5">
            <ul class="pagination">
                <li><a href="activity.jsp?pageCurrent=1">&laquo;</a></li>

                <li><a href="activity.jsp?pageCurrent=1">1</a></li>

                <li><a href="activity.jsp?pageCurrent=2">2</a></li>

                <li><a href="activity.jsp?pageCurrent=2">&raquo;</a></li>
            </ul>
        </div>
    </div>
</div>


<h1>活动内容</h1>
<jsp:include page="../index/index-foot.jsp"/>
</body>
</html>
